ABC (程式語言)
維基百科,自由的 encyclopedia
ABC是一種指令式通用程式語言和編程環境,最初由荷蘭數學和計算機科學研究學會(CWI)的里奧·格茨(Leo Geurts)、蘭伯特·梅爾滕斯(英語:Lambert Meertens)與史蒂文·彭伯頓(英語:Steven Pemberton)開發。它是指令式、結構化的高級語言,意圖用來取代BASIC、Pascal與AWK,它的設計目標是用於教學或建立原型,而非用作一種系統編程語言。
Quick Facts 編程範型, 設計者 ...
編程範型 | 多範式:指令式、過程式、結構化 |
---|---|
設計者 | 里奧·格茨(Leo Geurts) 蘭伯特·梅爾滕斯(英語:Lambert Meertens) 史蒂文·彭伯頓(英語:Steven Pemberton) |
實作者 | 荷蘭數學和計算機科學研究學會 |
面市時間 | 1987年1月,37年前(1987-01) |
型態系統 | 強類型, 多態 |
操作系統 | 類Unix, Windows, MacOS, Atari TOS |
網站 | homepages |
啟發語言 | |
SETL, ALGOL 68[1] | |
影響語言 | |
Python |
Close
ABC語言對Python語言有着主要的影響,Python的創立者吉多·范羅蘇姆在1982年至1986年間參與了ABC系統的設計與實現工作[2][3]。
特徵
ABC的設計者聲稱,典型的ABC程序的大小只是等價的Pascal或C程序的四分之一,並且更加具有可讀性。它的關鍵特徵包括:
- 只有五種基本數據類型。
- 不要求變量聲明。
- 顯式的支持自上而下編程。
- 語句嵌套通過越位規則使用縮進來指示。
- 任意精度算術,無大小限制的列表和字符串,支持正交性(英語:Orthogonality (programming))和初學者易用性的其他特徵。
ABC最初是一個單體實現,導致它不能適配新的需求,比如建立圖形用戶界面。ABC不能直接訪問底層文件系統和操作系統。
完全的ABC系統包括了使用結構編輯器(英語:Structure editor)(語法導向編輯器)、提示、持久變量和多工作空間的編程環境,並可獲得到ABC的解釋器/編譯器,其當前版本是1.05.02,它已經移植到了Unix、DOS、Atari和Apple Macintosh。
例子
一個函數words
,它在文檔中收集出所有單詞的集合:
HOW TO RETURN words document: PUT {} IN collection FOR line IN document: FOR word IN split line: IF word not.in collection: INSERT word IN collection RETURN collection
引用
- "He was clearly influenced by ALGOL 68's philosophy of providing constructs that can be combined in many different ways to produce all sorts of different data structures or ways of structuring a program." - Guido van Rossum Federico Biancuzzi; Shane Warden. Masterminds of Programming: Conversations with the Creators of Major Programming Languages. O'Reilly Media. April 2009: 32 [December 14, 2009]. ISBN 0-596-51517-0.
- Hamilton, Naomi. The A-Z of Programming Languages: Python. Computerworld (IDG Communications). 2008-05-08 [2020-09-04]. (原始內容存檔於2023-03-21).
Being youthful at the time I figured I could design and implement a language "almost, but not quite, entirely unlike" ABC, improving upon ABC's deficiencies, and solve our support applications problem, so around Christmas 1989, I started hacking.
- Stewart, Bruce. An Interview with Guido van Rossum. ONLamp.com. O』Reilly Media. 2002-06-04 [2020-09-04]. (原始內容存檔於2013-03-13).
I had been part of the ABC development team in the early 『80s, and in my head I had analyzed some of the reasons it had failed.
參考文獻
外部連結
- A Short Introduction to the ABC Language(頁面存檔備份,存於網際網路檔案館)
- ABC Programmer's Handbook(頁面存檔備份,存於網際網路檔案館)